package com.kaifamiao.why;

import java.math.BigDecimal;

public class FloatTest {

	public static void main(String[] args) {
		
		double x = 0.66 ;
		double y = 0.77 ;
		
		double z = x + y ;
		System.out.println( z );
		
		BigDecimal a = BigDecimal.valueOf( 66 , 2 );
		System.out.println( a );
		
		BigDecimal b = BigDecimal.valueOf( 77 , 2 );
		System.out.println( b );
		
		BigDecimal c = a.add( b ) ;
		System.out.println( c );

	}

}
